home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn WWW 1999 July
/
www_07_1999.iso
/
prog
/
mac
/
alpha
/
alpha.hqx
/
Alpha ƒ
/
Help
/
Alpha Commands
< prev
next >
Wrap
Text File
|
1999-04-12
|
37KB
|
697 lines
==============================================================================
= Alpha Commands
==============================================================================
In this list of routines, text between '<' and '>' is a placeholder for a
required parameter, text between '[' and ']' is a placeholder for an
optional parameter, and the '|' signifies a choice of two or more
alternatives. A '+' signifies that the previous symbol can be present one
or more times, while a '*" means zero or more times. Some commands have no
parameters, and are only expected to be called interactively.
The following are Alpha-specific tcl routines:
Ñ abbrev <label> <string> [<mode>] - register a label for <string>. See
'execAbbrev'.
Ñ abortEm - aborts whatever is currently happening
Ñ addAlphaChars <chars> - Add <chars> to the list of characters that internally
are caught by the 'isalnum' and 'isalpha' calls. Can be used to augment
the list of characters that the \w pattern in a regular expression
responds to. Use w/ care.
Ñ addMenuItem [-m] [-l <meta-characters>] <menu name> <item name> - Convert
item to menu form and add to specified menu. If '-m' specified, menu
form conversion not done. The '-l' option allows you to use menu meta
characters as text of menu items. If the '-l' option is used, the
<meta-characters> string is interpreted for menu item attributes, and
meta-characters in <item name> are included in the menu item text
literally. For example:
addMenuItem -m -l "/B" "Hello/C"
would appear as the text "Hello/C" in the menu, and have "B" as its
command equivalent.
Ñ addDef <var> <val> - Permanently save an association between the var
'var' and 'val'. 'addDef' and 'addArrDef' are now the sanctioned way to
save values between sessions. Also see 'removeDef' and 'removeArrDef'.
Ñ addArrDef <var> <field> <val> - Permanently save an association between
the var var(field) and 'val'.
Ñ AEBuild [<flags>] <app (name|creator)> <aesuite> <aeevent> [<event parameters>]* -
Build and send an apple-event. 'AEBuild' is apple's code of the same
name. Each "event parameter" is two parameters, a parameter type and
the data for the parameter. See the AEBuild doc for more details,
:Tcl:SystemCode:think.tcl for examples. The flags are '-r' (wait for reply),
'-q' (queue reply, in which case 'handleReply' (in appleEvents.tcl) is
called with the reply as a parameter, and '-t <timeout>' specifies the
timeout in ticks.
Ñ alertnote message_string
This command will display message_string in a standard Macintosh alert box.
Ñ alphaHelp - display Alpha help.
Ñ ascii (see bindings).
Ñ askyesno [-c] prompt
This command will display a Macintosh alert box with 'prompt' displayed
with the push buttons Yes and No. The command will return the
string "yes" or "no". The '-c' flag specifies that a cancel button be
used as well.
Ñ backSpace - delete selection, or a single char if no selection.
Ñ backwardChar - moves insertion one char back
Ñ backwardCharSelect - extends selection one char back
Ñ backwardDeleteWord - deletes previous word
Ñ backwardWord - moves insertion one word back
Ñ balance - selects smallest set of parens, braces, or
brackets that encloses the current selection
Ñ beep [-volume num] [-list | sndName]?
where -volume and -list are switches, while num and sndName are variables.
Ex: beep -volume 3 "click in set 5" play at volume 3 the sound named
"click in set 5" in the Alpha's snd resource.
Any sound stored in that resource can be used as well, so feel free to
paste a sound (with ResEdit) in the snd resource to have it available.
Ñ beginningBufferSelect - extend selection to the
beginning of the buffer
Ñ beginningLineSelect - extend selection to the
beginning of the line
Ñ beginningOfBuffer - move insertion to the beginning
of the buffer
Ñ beginningOfLine - move insertion to the beginning of
the line
Ñ Bind (see bindings)
Ñ blink <pos> - blink cursor at 'pos'
Ñ breakIntoLines <string> - return 'string' with
carriage returns and spaces inserted to satisfy
'leftFillColumn' and 'fillColumn' variables.
Ñ bringToFront <winName> - Bring named window to front.
Ñ buttonAlert <prompt> [<button>╔] - Create a dialog w/ the specified
buttons, returning the one selected.
Ñ capitalizeRegion - capitalize first word in selected region
Ñ capitalizeWord - capitalize word and move to its end
Ñ centerRedraw - redraw window with current line in
the middle.
Ñ clear - clear selected text
Ñ closeAll - close all windows
Ñ colorTriple [<prompt>] [<red> <green> <blue>] - Prompts user to choose
color. If specified, the input RGB value is used as the initial color on
the colorpicker.
Ñ copy - copy region
Ñ cp <fromName>+ <toName>
This command will copy the file fromName and name the new file toName,
overwriting any existing file. This command copies both data forks, and
the Finder information.
Ñ createTagFile - searches all files in current file set
and saves the locations of any function declarations
in a file called 'cTAGS'.
Ñ createTMark <name> <pos> - create a temporary 'mark'
at location 'pos'.
Ñ currentPosition - displays current and total bytes.
Ñ cut - deletes and saves region
Ñ deleteChar - delete char AFTER cursor
Ñ deleteMenuItem [-m] <menu name> <item name> - Convert item to menu form
and delete from specified menu. If '-m' specified, menu form conversion
not done.
Ñ deleteModeBindings <mode> - Delete all bindings for specified mode.
Ñ deleteSelection - delete current position, don't save
Ñ deleteWord - delete word after cursor
Ñ describeBinding - display the binding of the next typed key sequence.
Ñ deleteText <pos1> <pos2> - remove text between 'pos1'
and 'pos2'
Ñ dialog [<-w width>|<-h height>|<-b title l t r b>|<-c title val l t r b>|
<-t text l t r b>|<-e text l t r b>|<-r text val l t r b>|
<-p l t r b>]+
Create and display a dialog. '-w' and '-h' allow width and height of
dialog window to be set. '-b', '-c', '-r', '-t', '-e' and '-p' allow
buttons, checkboxes, radio buttons, static text, editable text and gray
outlines to be created, respectively. All control types (except gray
outlines) require specification of a title or text, together with left,
top, right, and bottom coordinates. Checkboxes and radioboxes have an
additional parameter, the default value. At least one button must be
specified. The return value is a list containing resulting values for
all buttons, radioboxes, checkboxes, and editable textboxes (static text
is ignored). Buttons have value '1' if chosen, '0' otherwise. The
dialog box exits at the first button press.
Ñ dirs - show current directory stack. See 'pushd' and 'popd'.
Ñ display [-w <win>] <pos> - move pos's line to top of screen.
Ñ displayMode <mode> - Up to four characters of the 'mode' string are
displayed in the status line at the bottom of a window.
Ñ dosc [<-c 'sign' | -n appName>] [-k 'clas'] [-e 'evnt'] <-s string | -f fileName> [<-t timeout|-r>]
Send an AppleEvent, by default class 'misc', event 'dosc'.
-c 'sign'
"sign" is a four-letter creator signature of a running application.
-n appName
"appName" is the name of a running application.
-k 'clas'
"clas" is a four-letter event class.
-e 'evnt'
"evnt" is a four-letter event class.
-s string
"string" is the text of a script to send to the other app.
-f fileName
"fileName" is the complete or relative pathname of a file the other
application should execute.
-t timeout
"timeout" is the number of ticks Alpha should wait for a response. A
timeout of "0" means wait forever.
-r
Do not wait for reply.
-q
Queue reply.
If neither of the '-c' and '-n' options is chosen, the PPC Browser is
used. Either '-s' or '-f' must be chosen. Thus, you can have "Alpha
5.02" and "Alpha 5.02 Copy" sending Apple events to each other, or they
can send events to a remote server such as Apple's ToolServer.
"$HOME:Tcl:UserCode:createStuffitArchive.tcl" contains examples of
controlling Stuffit Deluxe via this command.
Ñ downcaseRegion - changes all uppercase letters to
lowercase in current region
Ñ downcaseWord - changes all uppercase letters to
lowercase in current word
Ñ dumpColors - dump current foreground and background
colors into the current buffer in Alpha-readable
format.
Ñ echo <string>* - echo the strings (used
in shells).
Ñ edit [-r] [-m] [-c] [-w] [-g <l> <t> <w> <h>] <name> - Open a file in new
window. '-c' means don't prompt for duplicate win if file already open.
'-r' means open the file read-only. '-m' means omit the function titlebar
menu and present only the marks titlebar menu, which is labeled with the
contents of 'markLabel'. The '-g' option allows left and top coords to
be specified, plus width, and height. All or none. '-w' allows you to
bypass the "Wrap" dialog for files with long rows.
Ñ enableMenuItem <menuName> <item text> <on|off> - Either enable or
disable the menu item of user menu 'menuName' that has text '<item
text>'. Note that unless the menu is not only created, but also already
inserted, this command has no effect.
Ñ endBufferSelect - extend selection to the end of the
buffer
Ñ endKeyboardMacro - stop recording keyboard macro
Ñ endLineSelect - extend selection to the end of line
Ñ endOfBuffer - move insertion to the end of the buffer
Ñ endOfLine - move insertion to the end of the line
Ñ enterReplaceString - use current selection, if any, for future
replacements (in search dialog).
Ñ enterSearchString - use current selection, if any, for future searches.
Ñ evaluate - evaluates hilited text, or entire window if
nothing is hilited. 'evaluat'ing means that whatever
bindings or macro definitions are present in the
evaluated text take effect
Ñ eventHandler [class] [event] [proc] - Register 'proc' to handle the class
and event specified. Class and event are each 4 char args. 'proc' takes
a single argument that specifies the incoming event according to the
syntax here. There is currently no provision for a reply.
Ñ exchangePointAndMark - exchange the current 'mark'
w/ the current insertion point
Ñ execAbbrev - looks at current word and tries to expand it. Labels are
specified using 'abbrev'.
Ñ execute - prompt user for a function or macro. The
tab key acts as a "completion" command.
Ñ executeKeyboardMacro - execute the current keyboard
macro
Ñ fileInfo - prompts for a file, and displays type,
creator, sizes of both data and resource forks, last
modification time, and creation time
Ñ fileRemove - prompts for a file, and removes it
Ñ find - bring up the find dialog
Ñ findAgain - repeat search forward
Ñ findAgainBackward - repeat search backward
Ñ findFile [<path>] - open a file in a new window. An optional path parameter
specifies a default directory or file.
Ñ findInNextFile - search next file.
Ñ findTag - prompt user for a function name and attempt
to use the file 'cTAGS' to locate the function's
definition
Ñ float -m <menu> [<-h|-w|-l|-t|-M> <val>] [-n winname] [-z tag] -
Takes a created menu (not necessarily in the menubar), and makes a
floating window out of it. Returns integer tag that is used to remove
the window. NOT DYNAMIC! W/ no options returns all currently defined menus.
Displayed w/ system floating window WDEF if system 7.5, plainDBox
otherwise. -h through -M change width, height, left margin, top margin, and
margin between buttons. -z allows a ten-char tag to be specified for
'floatShowHide'.
Ñ floatShowHide <on|off> <tag> - Shows or hides all floats w/ specified
tag. Tags of current modes are automatically shown/hidden.
Ñ forwardChar - move insertion one character forward
Ñ forwardCharSelect - extend selection one character
forward
Ñ forwardWord - move insertion one word forward
Ñ freeMem - give a rough approximation of the current
memory reserves of ALPHA
Ñ get_directory [-p <prompt>]
This command will display a standard Macintosh file dialog and request the user
select a folder. The command will return the selected folder's full path name, or an
error if the Cancel button was selected.
Ñ getAscii - displays the ASCII code for character at
current insertion point
Ñ getChar - waits for a keystroke, returns ascii.
Ñ getModifiers - returns current modifiers mask. "OR" of several values,
cmdKey = 0x01, /* Bit 0 of high byte */
shiftKey = 0x02, /* Bit 1 of high byte */
alphaLock = 0x04, /* Bit 2 of high byte */
optionKey = 0x08, /* Bit 3 of high byte */
controlKey = 0x10, /* Bit 4 of high byte */
rightShiftKey = 0x20, /* Bit 5 of high byte */
rightOptionKey = 0x40, /* Bit 6 of high byte */
rightControlKey = 0x80, /* Bit 7 of high byte */
Ñ getColors - returns list of colors/hypertext for current document.
Format is list of lists, each sublist consisting of file offset, color
index, and possibly a hypertext command.
Ñ getfile [<prompt>] [<path>]
This command will display an SFGetFile() and return the full path name of the
selected file, or an error if CANCEL button was selected. An optional path
parameter specifies a default directory or file.
Ñ getFileInfo <file> <arr> - Given a file name, creates an array called
'arr' in the current context, containing fields 'created', 'creator',
'modified', 'type', 'datalen', and 'resourcelen'. 'created' and
'modified' are in a form suitable for the command 'mtime'.
Ñ getGeometry [win] - return a TCL list containing the left
edge of the current window, the top, the width, and height.
Ñ getline <prompt> <default>
This command will display a Macintosh alert box with prompt displayed, a
text edit field with default initially in the field, and with the push
buttons OK, Cancel.. The command will return the text entered into the
text edit field by the user, or an empty string if the user selected the
Cancel button.
Ñ getMainDevice - return a list containing the left, top, right, and
bottom of the rectangle defining the main device.
Ñ getMark - return the current mark.
Ñ getNamedMarks [-w <win>] [-n] -
return list of all permanent marks in open files. Each
element of a list describes one mark as a sublist of the mark's name,
the complete pathname of the mark's file, the position of the first
character in the first line displayed, the current position, and the
end of the selection if text is hilited, or the current position again
if there is no hilited section. '-w' allows window name to be applied
as filter, '-n' means only names will be returned.
Ñ getPathName - prompt the user with an SFGetFile dialog and return
complete pathname.
Ñ getPos [-w <win>] - return the current insertion point
Ñ getScrap - returns system TEXT scrap.
Ñ getSelect - return the currently selected text, if
any.
Ñ getText [-w <win>] <pos1> <pos2> - return the text between 'pos1'
and 'pos2'. '-w' can be used to specify a window.
Ñ getTMarks - Return a list of temporary marks. Each item of the returned
list is a sublist containing the mark name, the complete pathname of the
mark, and the start and finish of the selection named by the mark. The
following is an example of the result:
{{temp1 External:file.c 1312 1315} {temp2 Internal:it.h 111 111}}
Ñ getWinInfo [-w <win>] <arr> - Creates an array in current context
containing info about either the current or a specified window. Array
has fields 'state', 'platform', 'read-only', 'tabsize', 'split',
'linesdisp' (num lines that can be seen in the window), 'currline'
(first line displayed), and 'dirty'.
Ñ glob [-i] [-t <TYPE>] [-c <CRTR>]
The original glob provided by the UNIX version of tcl was not quite
adequate for the more complex Macintosh file system. Issues such as
invisible file handling, Finder type and creator filtering, and space
handling in file names. Release 6 of tcl has dealt with the original
problem with spaces in filenames, but the following options are provided
to deal with additional Macintosh issues.
Anyway, the new glob now takes several options. They are:
-i This option causes glob to list invisible files also.
-t TYPE This option causes glob to only list file with the
indicated Finder file typeTYPE. This option may be
used with the -c option.
-c CRTR This option causes glob to only list file with the
indicated Finder file creatorCRTR. This option may
be used with the -t option.
Also note that the original glob would skip dot files
(i.e., file names the begin with a period)
in the listing, unless the pattern began with a period.
Tickle extends this concept one step further on the
Macintosh, and skips spot files (i.e., file names that
begin with 'Ñ'), unless the pattern starts with a spot.
Ñ goto <pos> - goto the position 'pos'.
Ñ gotoMark - goto named mark, use 'mark' in macros.
Ñ gotoTMark <name> - goto the temporary mark 'name'.
Ñ icon [-f <winName>] [-c|-o|-t|-q] [-g <h> <v>] - Having to do w/
iconifying windows. '-c' means close (iconify) window, '-o' open, '-t'
toggle open/close, '-q' returns either a '1' for an iconified window or a
'0' for an uniconified window, and '-g' moves the icon to horizontal
position <h> and vertical position 'v'. Options are executed as they
are parsed, so the '-f' option, if present, should always be first.
Ñ icURL <URL> - passes arg to Internet Config, if present. Error if not
present.
Ñ icGetPref [<-t <type>] <pref name> - Gets preference from
Internet Config. '-t' allows type to be set, '0' returns a string
(default), '1' returns a path name, commonly used for helper apps. A
<pref name> of 'all' returns all valid preferences.
Ñ icOpen - Opens Internet Config
Ñ insertAscii - prompts for an ASCII code and inserts
into text.
Ñ insertColorEscape <pos> <color ind> [hypertext func] - Create a color
or style "point" for documentation purposes. Look at the file
"docColors.tcl" for examples. The hypertext func is only used when the
"point" is underline. See 'getColors' for info about the current file.
Ñ insertFile - prompts for a file name and inserts the
corresponding file into the current window. Not
undoable.
Ñ insertMenu <name> - insert the previously created user menu 'name' into
the menuBar.
Ñ insertPathName - present the user w/ a SFGetFIle dialog
and paste the complete path-name of the chosen file
into the current window
Ñ insertText [-w <win name>] <text>* - Insert 'text' at the current
insertion point. Mark is unchanged.
Ñ insertToTop - make the line that the insertion point
is on the first line shown, and display the current
line number along w/ the total number of lines in file
Ñ isearch - incremental search: searches w/o a dialog,
searches as you type the search pattern. Does not do
regular expression searches. 'matchWords'
automatically set to false.
Ñ iterationCount - allows actions to be repeated many times. "control-u 44
=" inserts 44 '='s into current window. Also can be used to execute any
function or macro (including the keyboard macro) many times. Defaults to
4.
Ñ keyAscii - insert ascii representation (in decimal)
of the keydown event, plus a modifier string, if
necessary.
Ñ keyCode - insert the key code along w/ a string
representing and modifiers into the current window.
Can be used to create bindings in 'Alphabits'.
Ñ killLine - kill text from insertion point to the end
of the line. If the line has no text, delete the line
and move succeeding lines up one.
Ñ killWindow - kill current window
Ñ largestPrefix <list> - Returns the longest prefix contained in all
strings of 'list'.
Ñ launch -f <name> - launch the named app into the background. Note that
for some yet unexplained reason, some applications (MicroSoft Word)
won't launch completely in the background. 'launch'ing such
applications won't insert the application into any system menu that
specifies running applications (although "About the Finder..." will
list it. The only way to get to such an app is through Alpha's
'switchTo', after which the application will finish launching. The '-f'
option gets around this by launching the application in the foreground
instead.
Ñ lineStart <pos> - return the position of the start of
the line 'pos' is on.
Ñ listpick [-p <prompt>] [-l] [-L <def list>] <list>
This command will display a dialog with the list displayed in a List Manager
list. If the user presses the Cancel button, an empty string is returned. If
the user selects the Open button, or double clicks an item in the list, that
item will be returned. If '-l' is specified, than the return is a list of
items.
Ñ lookAt [-w <name>] <pos> - return the 'pos'th character of the
current file, or the file named by <name> if the '-w' option is specified.
Ñ markHilite - This is the 'Hilite' from the 'Edit'
menu. If there is a currently hilited selection, the
selection is unhilited, leaving the mark and the
insertion point around the old selection. If there
is not a selection, the region between the insertion
point and the mark is selected.
Ñ markMenuItem [-m] <menuName> <item text> <on|off> [<mark char>] - Either mark or unmark
the menu item of user menu 'menuName' that has text '<item text>'.
Note that unless the menu is not only created, but also already
inserted, this command has no effect.
Ñ matchBrace - moves the insertion point to the
character that matches the character after the current
insertion point
Ñ matchIt <brace char> <pos> [<limit>] - Return pos of matching brace. Recognizes
parenthesis, square brackets, and curly braces. Optional third argument
specifies how many characters to search.
Ñ maxPos [-w <win>] - returns the number of characters in the front
window.
Ñ Menu [-s] [-n <name>] [-i <num] [-m] [-M <mode>] [-p <procname>] <list of menu items> -
Defines a new menu named 'name' (if provided w/ '-n' option). The menu is not
yet inserted into the menubar. The menu commands may be nested for
heirarchical menus, see 'AlphaBits.tcl' for examples. Alpha massages the
function names to make them look better in the menus.
'-c' Ignore any menu meta-chars. Can also be done on a per-item basis
by appending an ampersand ('&') to the end of an item.
'-s' Use system menu definition proc (faster).
'-n <num>' Resource id of icon suite to use for menu title. 'ics#'
is the only resource that is really necessary.
'-n <name>' Name the menu. Not necessary for submenus.
'-m' No menu form. If not supplied, each menu item is split into
words at each capitalized letter.
'-p <name>' The tcl proc named by 'name' is called w/ the menu's name
and the item's contents when the item is chosen.
'-M <mode>' Specifies that any bindings created by the menu are
specific to a given mode. This is important because mode-specific
bindings over-ride global bindings.
Ñ message <string> - prints 'string' on the status line.
Ñ mkdir <name> - creates a directory (folder) named
'name' in the current directory.
Ñ mousePos - Returns list <row,col> of mouse position, if the mouse is
currently over the active window. Otherwise, return error (catch w/
'catch').
Ñ moveInsertionHere [-last] - move the insertion point to the
first (or last) line displayed
Ñ moveFile <fromName> <toName>
This command will move the file fromName to toName, overwriting any
existing file. The move can not be made across volume (disk drives)
boundaries.
Ñ moveWin [win name] <left> <top> - moves current or specified window.
The window name can be "StatusWin".
Ñ mtime <time> [long|short|abbrev]
Returns a date and time string using the Macintosh International Utilities. The
long/short/abbrev specification corresponds to the date. These are the following
formats:
short 3/16/92 9:20:46 PM
abbrev Mon, Mar 16, 1992 9:20:49 PM
long Monday, March 16, 1992 9:20:43 PM
The returned value actually is in the form of a list. To get text as
above, run the result through 'join', as in "join [mtime [now] short]".
Ñ nameFromAppl '<app sig>' - Interrogates the desktop database for the first
existing app that has the desired signature. <app sig> is four chars
inside single quotes.
Ñ new [-g <l> <t> <w> <h>] [-n <name>] - opens an untitled window. Can optionally
provide left and top coordinates, plus width and height. All or none.
Ñ nextLine - move insertion point to next line
Ñ nextLineSelect - extend selection to the next line
Ñ nextLineStart <pos> - return the position of the start
of the next line after position 'pos'.
Ñ nextSentence - go to next sentence ("fill.tcl").
Ñ nextWindow - select next window
Ñ now
Returns the current time as Macintosh seconds. This is the number of seconds that
have elapsed since Midnight Jan 1, 1904.
Ñ oneSpace - converts whitespace surrounding insertion
into a single space.
Ñ openLine - insert a new line following the current
one and move the insertion point to it
Ñ otherPane - If window is split, select the other pane.
Ñ pageBack - display prev screenful, move the
insertion point if 'moveInsertion' enabled
Ñ pageForward - display next screenful, move the
insertion point if 'moveInsertion' enabled
Ñ pageSetup - display the printing PageSetup dialog.
Ñ paste - insert the last chunk of text created by 'cut'
or 'copy'
Ñ performSearch [options╔] <pattern> <pos> - as for 'search' but also
selects the range of characters which are found, and ensures Alpha's
internal state is consistent for following replace/replaceAll/...
commands.
Ñ popd - Pop top dir off dir stack and 'cd' to it.
Ñ posToRowCol <pos> - converts from absolute position to row, col.
Ñ prefixChar - used to further modify the next keystroke
combination, in the same manner as using the shift key
in the next keystroke
Ñ previousLine - move insertion point to the previous
line
Ñ prevLineSelect - extend selection to the previous line
Ñ prevSentence - go to previous sentence ("fill.tcl").
Ñ prevWindow - select previous window
Ñ print - print front window
Ñ processes - returns info of active processes. A list of lists, each
sublist contain a file-name, an application signature, the application
memory size, and the number of ticks the application has been active.
Ñ prompt <prompt> <default> [<name> <menu item>*] - prompt dialog to
the user with a prompt string and a default value. The prompt dialog can
optionally include a popup menu specified by 'name' and the succeeding
strings. Selection of the popup menu items inserts the item text into the
editable dialog item. 'Prompt' returns the value of the editable item.
If the 'Cancel' button is selected, the tcl returns an error and your
script will be stopped unless you execute the command from 'catch'.
Ñ pushd [<dir>] - If 'dir' specified, push current folder into directory
stack and 'cd' to dir. Otherwise, swap current dir w/ top of dir stack.
Ñ putfile <prompt> <original>
This command will display an SFPutFile() and return the full path name of the
selected file, or an empty string if CANCEL button was selected. Original is the
default name displayed for the user.
Ñ putScrap [<string>]+ - Concatenate strings together into the system
scrap. The scrap can be appended to through calls of the form 'putScrap
[getScrap] " another word"'.
Ñ pwd
This command will return the current working directory, ending in a colon.
Ñ quit - quits ALPHA
Ñ rectMarkHilite - creates a rectangular selection
between the mark and the insertion point.
Ñ redo - redo the next action that has been undone but
not redone
Ñ regModeKeywords [options] <mode> <keyword list> - Set keywords and comments that
Alpha can recognize to color them. Specifically, in mode <mode>, every
keyword specified in the list is colored non-black (blue, by default).
Comments, if specified by '-e' or '-b' below, are colored red by defualt.
-a Keywords will be *added* to existing mode
keywords. The new keywords can be a different
color than older keywords. This flag can also be
used to modify other attributes, but it cannot be
used to modify colors of existing keywords.
-m <c> Specify a magic character. Every word beginning with the
magic character is a keyword.
-e <commentstr> Specify a string that begins comments that last to
the end of the line.
-b <comment beg> <comment end> Specify a pair of strings that bracket a
comment.
-c <color> Comment color.
-k <color> Keyword color.
-s <color> String color. Alpha can color single-line
strings only, using the simple heuristic
of assuming the first two double quotes
constitute a string.
-i <char> Specify a character to display differently.
Commonly used for curly braces, etc.
-I <color> Color of above characters.
Keywords must be less than 20 characters long.
Ñ removeArrDef <var> <field> - Remove the pernament definition of
'var(field)'. See 'addDef' and 'addArrDef'.
Ñ removeDef <var> - Remove the permanent definition of 'var'.
Ñ removeFile <fileName>
This command will delete the file or folder 'fileName'.
Ñ removeMenu <name> - remove menu 'name' from menubar, except those
specified by previous 'makeMenuPermanent' calls.
Ñ removeTMark <name> - remove temporary mark.
Ñ replace - replace the current selection
Ñ replaceAll - replace all further occurrences in the current file or
set of files.
Ñ replace&FindAgain - replace the current selection and find next
occurrence.
Ñ replaceString [<str>] - specifies replacement string. Returns current
replacement string if no arg.
Ñ replaceText ?-w win? <pos1> <pos2> [text]+ - replaces the text
between 'pos1' and 'pos2' with 'text', where 'text' can be any number
of arguments. Leaves insertion at end, mark at beginning of inserted
text.
Ñ restoreVars - restore variables to saved state,
see 'saveVars'
Ñ revert - revert the file to its last saved version
Ñ rmdir <dirname> - remove a directory (folder)
Ñ rowColToPos [-w <win>] <row> <col> - converts to abosolute position.
Accepts optional -w parameter that allows window to be specified.
Ñ rsearch - reverse incremental search, see 'isearch'.
Ñ save - save current window
Ñ saveAs ?-f? [def name] - save current window with new name. Optionally
takes a default filename. Returns complete path of saved file, if ok hit,
otherwise TCL_ERROR returned. If '-f' flag given, then we force the save
without any standard-file dialog.
Ñ saveVars - save variable state, see 'restoreVars'
Ñ scrollDownLine - same action as that which occurs when
the down arrow in the vertical scrollbar is selected
Ñ scrollLeftCol - same action as that which occurs when
the left arrow in the horizontal scrollbar is selected
Ñ scrollRightCol - same action as that which occurs when
the right arrow in the horizontal scrollbar is
selected
Ñ scrollUpLine - same action as that which occurs when
the up arrow in the vertical scrollbar is selected
Ñ search [options╔] <pattern> <pos> -
-f <num> - go forward?
-r <num> - regular expression?
-s - save previous search string and search flags.
-i <num> - ignore case?
-m <num> - match words?
-n - failed search still returns TCL_OK, but null string.
-l <limit> - limit on how search goes.
-- - next arg is the pattern.
Searches for 'pattern' from position 'pos'. If the search succeeds, a
list of two positions will be returned. The first is the starting position
of the match, the second is one past the last character. If no '-n',
TCL_ERROR returned. See also performSearch
Ñ searchString [<str>] - allows search string to be specified. Returns
current searchstring if no arg.
Ñ select [-w <win>] <pos1> <pos2> - selects the text between 'pos1'
and 'pos2'.
Ñ selEnd [-w <win>] - returns the end of the hilited selection, or
the current insertion point if no text is selected.
Ñ sendOpenEvent [filler] <app name> <file name> - Send an open doc event to
another currently running application. If 'filler' is noReply, then a
reply is not requested. Otherwise, we wait for a reply and 'filler' is
ignored.
Ñ setFileInfo <file> <field> [arg] - Allows some information to be set
for files. Settable fields are 'modified', 'created', 'creator', and 'type'.
All take an argument except 'resourcelen' which just removes the resource fork. 'file' is a complete pathname.
Ñ setFontsTabs - bring up font and tab dialog
Ñ setMark - set the current mark to the insertion point
Ñ setNamedMark [name disp pos end] - set named mark. If optional arguments are
present, the mark is created without prompting user. 'disp' is the
character position of the start of the first line to be displayed,
while 'pos' and 'end' bracket the text to be selected.
Ñ setWinInfo [-w <win>] <field> <arg> - Sets a piece of data about either
the current or a specified window. Settable fields 'platform', 'state',
'read-only', 'tabsize', 'dirty', and 'shell'. 'shell' means that dirty
flag ignored and undo off.
Ñ shell - open the Tcl shell.
Ñ sizeWin [win name] <width> <height> - sets size of current or specified window.
The window name can be "StatusWin", although only the width can be
changed.
Ñ spacesToTabs - convert spaces in selection to tabs
Ñ specToPathName [hex data] - given an FSSpec in hex form (as that
returned by aebuild, for instance, see the definition of thinkFileName
in :Tcl:SystemCode:think.tcl), return a complete pathname.
Ñ splitWindow [percent] - toggle having window split into two panes.
Optional arg specifies percent of window to allocate to the first pane.
Ñ startEscape - used to further modify the next
keystroke combination, in the same manner as using the
shift key in the next keystroke
Ñ startKeyboardMacro - start recording keyboard macro
Ñ statusPrompt <prompt> [<func>] - Prompt in the status window. If 'func'
is present, call this routine at each key-press with the current
contents of the status line and the key, insert into statusline
whatever is returned by the func. Command-v pastes the current (<80
char) clipboard contents on the status line.
Ñ substituteVars <string> - Takes a single string and
substitutes for all variables inside it, regardless of
depth. Unfortunately, you currently need to make 'global var'
declarations in the proc you call this for each 'var' that might need
to be substituted in the string (see proc.tcl for examples).
Ñ switchTo <appName> - Switches to application 'appName'.
Ñ tab - insert a tab
Ñ tabsToSpaces - convert tabs in selection to spaces.
Ñ ticks
Returns the current TickCount. Ticks are 60ths of a seconds. TickCount is the
number of ticks since the Macintosh was started. The command:
puts stdout [expr "[ticks] / 60"]
will print the number of seconds since the Macintosh was booted.
Ñ toggleScrollbar - toggles horizontal scrollbar on frontmost window.
Will not succeed if scrollbar scrolled.
Ñ traceFunc on <funcName> <winName> Trace 'funcName', send output to
'winName'.
traceFunc off Turn function tracing off.
traceFunc status Display current tracing status.
Ñ unascii (see bindings)
Ñ unbind (see bindings)
Ñ undo - undo the last action that has not been undone
Ñ unfloat <float num> - removes specified floating window. W/ no options
lists all floating windows.
Ñ upcaseRegion - convert all lowercase letters to
uppercase in the current region
Ñ upcaseWord - convert all lowercase letters to
uppercase in the current word
Ñ version - Return string of the form "Alpha Version 5.31, Feb. 15, 1993".
Ñ watchCursor - turns the cursor into a a watch cursor.
Ñ wc <file>... - counts chars, words, lines of input files.
Ñ winNames [-f] - return a TCL list of all open windows. If '-f' option
specified, complete pathnames are returned.
Ñ wrap - see the section on "Fill" routines.
Ñ wrapText
Ñ xtclcmd [-f filename] <cmdname> [argument_list]*
This command will load the external command cmdname and pass it the argument
list [ cmdname argument_list... ]. External command are code resources of type
XTCL. They may be located in the resource fork of the tickle application, or they
may be located in a file named XTCL File in the same directory as the tickle
application. If the optional -f filename is included, the external command will first
be loaded from filename before the other two files.
See the appendix for a detailed description of the external tcl command interface.
See the accompanying sources for an example of writing an XTCL.
Ñ yank - insert the last piece of deleted text of less
than 1k. Consecutive deletes are concatenated.
together.
Ñ zapInvisibles - removes chars < ascii 32, except for
LF's and CR's.
Ñ zoom - zooms the current window